class PostLinkRenderer < WillPaginate::ActionView::LinkRenderer

  def url(page)
  	if(@options[:url] != nil)
  		url = @options[:url].sub(/\/p(\d+)(\/*)$/, '').sub(/(\/*)$/, '')
  		return url << "/p#{page}/"
  	end
  	"p#{page}/"
  end

end
